var li=document.querySelectorAll('#content li');
var span=document.querySelector('#btn-content');
for(var i=0;i<li.length;i++){
    li[i].onclick=function(){
        span.innerHTML=this.innerHTML;
    }
}
var binli=document.querySelector('#binli');
var keshi=document.querySelector('#keshi');
var fashen=document.querySelector('#fashen');
var begin=document.querySelector('#begin');
var AOBblood=document.querySelector('#AOBblood');
var RDHblood=document.querySelector('#RDHblood');
var submit=document.querySelector('#sub');
var reg=/^[A-Z]{4}\d{17}$/;
var reg2=/^[A|B|O|AB]{1,2}$/;
submit.onclick=function(){
    var str=binli.value;
    var str1=keshi.value;
    var str2=fashen.value;
    var str3=begin.value;
    var str4=AOBblood.value;
    var str5=RDHblood.value;
    console.log(str2)
    console.log(str3)
    if(reg.test(str) && reg2.test(str4) && str5=='阳' || str5=='阴' && str1!=='' && str2!=='' && str3!==''){
    localStorage.setItem('binli',str);
    localStorage.setItem('keshi',str1);
    localStorage.setItem('fashen',str2);
    localStorage.setItem('begin',str3);
    localStorage.setItem('AOB',str4);
    localStorage.setItem('RDH',str5);
    }else{
        alert('请完成正确的内容')
    }
}
